using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace FreeSqlLearn {

	/// <summary>
	/// 学员账号
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = false)]
	public partial class StudentAccount
	{
		/// <summary>
		/// 雪花算法ID
		/// </summary>
		[Snowflake]
		[JsonProperty, Column(IsPrimary = true)]
		public long Id { get; set; }

		/// <summary>
		/// 账号
		/// </summary>
		[JsonProperty, Column(StringLength = 50)]
		public string UserName { get; set; }

		/// <summary>
		/// 密码
		/// </summary>
		[JsonProperty, Column(StringLength = 100)]
		public string PassWord { get; set; }
		/// <summary>
		/// 姓名
		/// </summary>
		[JsonProperty, Column(StringLength = 50)]
		public string Name { get; set; }
		/// <summary>
		/// 身份证号
		/// </summary>
		[JsonProperty, Column(StringLength = 18)]
		public string IdCard { get; set; }
		/// <summary>
		/// 手机号
		/// </summary>
		[JsonProperty, Column(StringLength = 11)]
		public string Mobile { get; set; }
		/// <summary>
		/// 报名时间
		/// </summary>
		[JsonProperty]
		public DateTime RegisterDate { get; set; }
		/// <summary>
		/// 微信OpenId
		/// </summary>
		[JsonProperty, Column(StringLength = 50)]
		public string WeixinOpenId { get; set; }
		/// <summary>
		/// 是否已绑定
		/// </summary>
		[JsonProperty]
		public bool IsBinding { get; set; }
		/// <summary>
		/// 绑定时间
		/// </summary>
		[JsonProperty]
		public bool BindingTime { get; set; }
		/// <summary>
		/// 是否禁用
		/// </summary>
		[JsonProperty]
		public bool IsForbidden { get; set; }
		/// <summary>
		/// 禁用/启用时间
		/// </summary>
		[JsonProperty]
		public DateTime ForbiddenTime { get; set; }
		/// <summary>
		/// 最后禁用/启用原因
		/// </summary>
		[JsonProperty, Column(StringLength = 250)]
		public string ForbiddenReason { get; set; }
		/// <summary>
		/// 账户余额
		/// </summary>
		[JsonProperty, Column(Precision = 18,Scale = 2)]
		public decimal Balance { get; set; }
		/// <summary>
		/// 版本号
		/// </summary>
		[JsonProperty, Column(IsVersion = true)]
		public int SysVersion { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty,Column(CanInsert =true,CanUpdate = false,ServerTime =DateTimeKind.Local)]
		public DateTime CreateTime { get; set; }
		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(CanInsert =true,CanUpdate =true,ServerTime =DateTimeKind.Local)]
		public DateTime UpdateTime { get; set; }

	}

}
